package diplom.shop.domain;

public class Processor extends Device{
	
	private String processorFamily;
	private String socket;
	private String contactCount;
	private String internalClockFrequency;
	private String coreCount;
	private String casheFirstLevel;
	private String casheSecondLevel;
	private String integratedGraphics;
	public Processor() {
		super();
	}
	public Processor(String processorFamily, String socket,
			String contactCount, String internalClockFrequency,
			String coreCount, String casheFirstLevel, String casheSecondLevel,
			String integratedGraphics) {
		super();
		this.processorFamily = processorFamily;
		this.socket = socket;
		this.contactCount = contactCount;
		this.internalClockFrequency = internalClockFrequency;
		this.coreCount = coreCount;
		this.casheFirstLevel = casheFirstLevel;
		this.casheSecondLevel = casheSecondLevel;
		this.integratedGraphics = integratedGraphics;
	}
	public String getProcessorFamily() {
		return processorFamily;
	}
	public void setProcessorFamily(String processorFamily) {
		this.processorFamily = processorFamily;
	}
	public String getSocket() {
		return socket;
	}
	public void setSocket(String socket) {
		this.socket = socket;
	}
	public String getContactCount() {
		return contactCount;
	}
	public void setContactCount(String contactCount) {
		this.contactCount = contactCount;
	}
	public String getInternalClockFrequency() {
		return internalClockFrequency;
	}
	public void setInternalClockFrequency(String internalClockFrequency) {
		this.internalClockFrequency = internalClockFrequency;
	}
	public String getCoreCount() {
		return coreCount;
	}
	public void setCoreCount(String coreCount) {
		this.coreCount = coreCount;
	}
	public String getCasheFirstLevel() {
		return casheFirstLevel;
	}
	public void setCasheFirstLevel(String casheFirstLevel) {
		this.casheFirstLevel = casheFirstLevel;
	}
	public String getCasheSecondLevel() {
		return casheSecondLevel;
	}
	public void setCasheSecondLevel(String casheSecondLevel) {
		this.casheSecondLevel = casheSecondLevel;
	}
	public String getIntegratedGraphics() {
		return integratedGraphics;
	}
	public void setIntegratedGraphics(String integratedGraphics) {
		this.integratedGraphics = integratedGraphics;
	}
	@Override
	public String toString() {
		return "Processor [processorFamily=" + processorFamily + ", socket="
				+ socket + ", contactCount=" + contactCount
				+ ", internalClockFrequency=" + internalClockFrequency
				+ ", coreCount=" + coreCount + ", casheFirstLevel="
				+ casheFirstLevel + ", casheSecondLevel=" + casheSecondLevel
				+ ", integratedGraphics=" + integratedGraphics + "]";
	}
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result
				+ ((casheFirstLevel == null) ? 0 : casheFirstLevel.hashCode());
		result = prime
				* result
				+ ((casheSecondLevel == null) ? 0 : casheSecondLevel.hashCode());
		result = prime * result
				+ ((contactCount == null) ? 0 : contactCount.hashCode());
		result = prime * result
				+ ((coreCount == null) ? 0 : coreCount.hashCode());
		result = prime
				* result
				+ ((integratedGraphics == null) ? 0 : integratedGraphics
						.hashCode());
		result = prime
				* result
				+ ((internalClockFrequency == null) ? 0
						: internalClockFrequency.hashCode());
		result = prime * result
				+ ((processorFamily == null) ? 0 : processorFamily.hashCode());
		result = prime * result + ((socket == null) ? 0 : socket.hashCode());
		return result;
	}
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		Processor other = (Processor) obj;
		if (casheFirstLevel == null) {
			if (other.casheFirstLevel != null)
				return false;
		} else if (!casheFirstLevel.equals(other.casheFirstLevel))
			return false;
		if (casheSecondLevel == null) {
			if (other.casheSecondLevel != null)
				return false;
		} else if (!casheSecondLevel.equals(other.casheSecondLevel))
			return false;
		if (contactCount == null) {
			if (other.contactCount != null)
				return false;
		} else if (!contactCount.equals(other.contactCount))
			return false;
		if (coreCount == null) {
			if (other.coreCount != null)
				return false;
		} else if (!coreCount.equals(other.coreCount))
			return false;
		if (integratedGraphics == null) {
			if (other.integratedGraphics != null)
				return false;
		} else if (!integratedGraphics.equals(other.integratedGraphics))
			return false;
		if (internalClockFrequency == null) {
			if (other.internalClockFrequency != null)
				return false;
		} else if (!internalClockFrequency.equals(other.internalClockFrequency))
			return false;
		if (processorFamily == null) {
			if (other.processorFamily != null)
				return false;
		} else if (!processorFamily.equals(other.processorFamily))
			return false;
		if (socket == null) {
			if (other.socket != null)
				return false;
		} else if (!socket.equals(other.socket))
			return false;
		return true;
	}
	
	

}
